home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / emul / cp4 / support / playsid3.0 / arexx / preview.rexx < prev   
OS/2 REXX Batch file  |  1999-01-01  |  552b  |  28 lines

  1. /* PlaySID example */
  2.  
  3. if(~show('l', 'rexxsupport.library'))then do
  4.    if(~addlib( 'rexxsupport.library', 0, -30, 0))then do
  5.       say "Could not open ARexx support library."
  6.       exit 10
  7.    end
  8. end
  9.  
  10. parse arg name
  11. path = "sid:music/"
  12.  
  13. address command "run SID:PlaySID"
  14. say "Loading"
  15. if SID_Load(path || name) then do
  16.    numtunes =  SID_NumTunes()
  17.    say "Found" numtunes "tunes"
  18.    do tune = 1 to numtunes
  19.       say "Playing tune" tune
  20.       SID_SetTune(tune)
  21.       SID_Play()
  22.       Delay(5 * 50)
  23.    end
  24.    say "Stopped"
  25.    SID_Stop()
  26. end
  27. SID_Quit()
  28.